<div class="contents">
  <ol class="breadcrumb">
    <li><a href="#/index/panel">首页</a></li>
    <li><a href="#/personalsupplier/list">个人供应方列表</a></li>
    <li class="active">详情</li>
    <li class="op-bc">
    <div ng-if="bean.blackList == 2" class="glyphicon glyphicon-plus" ng-click="showBlackAddForm(id)">加入黑名单</div>
     <div ng-if="bean.blackList == 1" class="glyphicon glyphicon-plus" ng-click="showBlackDelForm(id)">移除黑名单</div>
    </li>
  </ol> 
  
  <table class="table table-striped table-bordered">
    <tbody> 
      <tr> 
        <td class="text-muted"  width="150">登录名</td> <td width="300">{{bean.loginName}}</td>
        <td class="text-muted" width="150">手机号码</td> <td >{{bean.mobile}}</td> 
      </tr>
      <tr> 
        <td class="text-muted" >真实姓名</td> <td  >{{bean.name}}</td>
        <td class="text-muted" >状态</td> <td >{{bean.checkStatus|productSupplierStatusRender}}</td> 
      </tr>
      <tr> 
        <td class="text-muted" >邮箱地址</td> <td  >{{bean.emailAddress}}</td>
        <td class="text-muted" >公司名称</td> <td >{{bean.companyName}}</td> 
      </tr>
      <tr> 
        <td class="text-muted" >公司地址</td> <td  >{{bean.companyAddress}}</td>
        <td class="text-muted" >职位</td> <td >{{bean.companyPosition}}</td> 
      </tr>
      <tr> 
        <td class="text-muted">注册时间</td> 
        <td >{{bean.faCreateDate | date:'yyyy-MM-dd HH:mm:ss'}}</td> 
        <td class="text-muted">最后登录时间</td> <td >{{bean.lastLoginTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>  
      </tr> 
      <tr> 
        <td class="text-muted">最后登录IP</td> <td >{{bean.lastLoginIp}}</td>  
        <td class="text-muted">是否回访</td>
        <td>
          <span ng-if="bean.flagVisit">
            <a href="javascript:" ng-click="showVisitLayer(bean.id)">已回访</a>
          </span>
          <span ng-if="!bean.flagVisit">
            <a href="javascript:" ng-click="showVisitLayer(bean.id)">未回访</a>
          </span>
        </td>
      <tr> <td class="text-muted">审核备注</td> <td colspan="3">{{bean.auditRemarks}}</td> </tr>
      <tr> 
        <td class="text-muted">审核失败原因</td> 
        <td colspan="3">
          <span ng-if="bean.checkStatus == 3">{{bean.failReson}}</span>
        </td> 
      </tr>
      <tr> <td class="text-muted">名片</td> <td  colspan="3">
        <div class="cert-img-box"><a ng-href="{{staticHost}}{{bean.businessCardAddress}}" target="_blank"><img ng-src="{{staticHost}}{{bean.businessCardAddress}}" ng-show="bean.businessCardAddress"/></a></div>
        <div class="mt-20 ">
          <div class="btn btn-primary add-pic-btn mt-15" ng-show="item.uRole == '98' || item.uRole == '99' || item.uRole == '1'">上传名片</div>
          <div class="btn btn-primary  mt-15 ml-10" ng-click="saveUpload()" ng-show="isShowSaveUpload">保存名片</div>
        </div>
      </td> </tr>
      
    </tbody>
  </table> 
  <form class="form-horizontal cert-form" role="form" name="certform" ng-submit="personalSupplierSave()" novalidate>
    <div class="form-group" >
      <label class="col-sm-2 control-label">公司名称</label>
      <div class="col-sm-5">
        <input type="text" class="form-control" placeholder="公司名称地址" name="companyName" ng-model="save.companyName">
      </div>
    </div>
    <div class="form-group" >
      <label class="col-sm-2 control-label">公司地址</label>
      <div class="col-sm-5">
        <input type="text" class="form-control" placeholder="公司地址" name="companyAddress" ng-model="save.companyAddress">
      </div>
    </div>
    <div class="form-group" >
      <label class="col-sm-2 control-label">职位</label>
      <div class="col-sm-5">
        <input type="text" class="form-control" placeholder="职位" name="companyPosition" ng-model="save.companyPosition" >
      </div>
    </div>
    <div class="form-group" ng-class="{'has-error':certform.emailAddress.$invalid}">
      <label class="col-sm-2 control-label">邮箱</label>
      <div class="col-sm-5">
        <input type="email" class="form-control" placeholder="邮箱" name="emailAddress" ng-model="save.emailAddress" >
      </div>
    </div>
    <div class="form-group" ng-class="{'has-error':certform.uRole.$invalid}">
      <label for="advertTitleInput" class="col-sm-2 control-label">认证情况</label>
      <div class="col-sm-5">
        <select class="form-control" name="uRole" ng-model="save.uRole" ng-options="m.value as m.text for m in dictMap['certResultModel']" required="required" ng-change="selectRoleResult(this,m.value)"> </select>
      </div>
    </div>
    <div class="form-group" ng-if="save.uRole == 99" ng-class="{'has-error':certform.uAuditOpinion.$invalid}">
      <label for="advertTitleInput" class="col-sm-2 control-label">认证未通过原因</label>
      <div class="col-sm-5">
        <select class="form-control" name="failReson" ng-model="save.failReson" required="required" ng-change="auditOption();">
          <option value="注册手机号码与名片手机号码不一致">注册手机号码与名片手机号码不一致</option>
          <option value="未上传名片或上传名片与资质要求不符">未上传名片或上传名片与资质要求不符</option>
          <option value="3">其他</option>
        </select>
      </div>
    </div>
    <div class="form-group" ng-show="aoMsg" ng-class="{'has-error':certform.auditOptionMessage.$invalid}">
      <label class="col-sm-2 control-label"></label>
      <div class="col-sm-5">
        <input type="text" class="form-control" name="auditOptionMessage" ng-model="auditOptionMessage" placeholder="认证未通过原因">
      </div>
    </div>
    <div class="form-group">
      <label for="advertTitleInput" class="col-sm-2 control-label">审核评级</label>
      <div class="col-sm-8">
        <ul class="cert-level-list"><li ng-repeat="o in dictMap['productSupplierStatusTypeModel']" ng-click="selectLevelType(o.value)" ng-class="{selected:save.checkStatus==o.value}">{{o.text}}</li></ul>
      </div>
    </div>
    <div class="form-group" ng-class="{'has-error':certform.auditRemarks.$invalid}">
      <label for="auditRemarks" class="col-sm-2 control-label">备注</label>
      <div class="col-sm-5">
        <textarea class="form-control" id="auditRemarks" placeholder="备注" name="auditRemarks" ng-model="save.auditRemarks" style="height:80px;"></textarea>
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-5">
        <button type="submit" class="btn btn-default">提交</button>
      </div>
    </div>
  </form>
</div>

<div class="layer-box" ng-show="showBlackAddFormFlag">
  <div class="layer-bg"></div>
  <div class="layer-con " style="padding:10px 20px;">
    <span class="icons-close" title="关闭" ng-click="showBlackAddFormFlag = false;">X</span>
    <div class="layer-title">
      请填写加入黑名单原因
    </div>
    <div class="con-wrap">
      <form class="form-horizontal" role="form" name="form" novalidate ng-submit="blackAdd()">
        <div class="form-group" ng-class="{'has-error':form.remark.$invalid}"> 
          <textarea class="form-control" autocomplete="off" value="" name="remark" ng-model="black.remarks" maxlength="100" required="required" placeholder="加入黑名单原因" style="height:100px;"></textarea>
        </div> 
        <div class="form-group" >
          <input type="submit" class="btn btn-block btn-primary" value="保存" />
        </div>
      </form>
    </div>
  </div>
</div> 

<div class="layer-box" ng-show="isShowVisitLayer">
  <div class="layer-bg"></div>
  <div class="layer-con " style="padding:10px 20px; width:450px; left:40%;top:20px; height: 450px; overflow: hidden;">
    <span class="icons-close" title="关闭" ng-click="isShowVisitLayer = false;">X</span>
    <div class="layer-title">
      FA手机号:{{item.uMobile}}
    </div>
    <div class="con-wrap">
      <div class="form-group" >
        <div style="width:100%; height:340px; overflow:hidden; overflow: auto; overflow-x: hidden;">
          <table class="table table-striped table-bordered">
            <tr>
              <td>回访人</td>
              <td>回访备注</td>
              <td>回访时间</td>
            </tr>
            <tr ng-repeat="v in visitList">
              <td>{{v.visitPerson}}</td>
              <td>{{v.remark}}</td>
              <td>{{v.createDate | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
            </tr>
          </table>
        </div>

        <table class="table table-striped table-bordered">
          <tr ng-if="item.mediaSource === 'YQF' && '0' != item.isValid && '1' != item.isValid">
            <td style="width:70%">
              <select class="form-control" ng-model="adValid">
                <option value="">请选择</option>
                <option value="2">未知</option>
                <option value="0">无效</option>
                <option value="1">有效</option>
              </select>
            </td>
            <td>
              <input type="button" value="修改用户有效性" class="btn btn-small btn-warning" ng-click="faUserVisitUpdate(adValid)" ></input> 
            </td>
          </tr>
          <tr>
            <td><input type="text" class="form-control" ng-model="visit.remark"/></td>
            <td>
              <input type="button" value="添加回访"  class="btn btn-small btn-warning" ng-click="addPersonalSupplierVisit()" />
            </td>
          </tr>
        </table>
      </div>
    </div>
  </div>
</div> 

<div load-script src="'/static/jquery.jUploader-1.01.js?7'" call-back="" charset="utf-8" ></div>
